package com.maiji.cloud.response.login;

import com.maiji.cloud.entities.login.RecipeIngredient;
import com.maiji.cloud.response.shopingmall.GoodsResData;
import com.maiji.cloud.utils.ShareInfoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@ApiModel
public class RecipeResData extends RecipeData{

    @ApiModelProperty(value="菜谱主键")
    private String uuId;

    @ApiModelProperty(value="菜谱主图")
    private UploadImageResData mainImage;

    @ApiModelProperty(value="食谱名称")
    private String name;

    @ApiModelProperty(value="食谱别名")
    private String alias;

    @ApiModelProperty(value="食谱别名")
    private List<String> aliases;

    @ApiModelProperty(value="食谱主料[]")
    private List<RecipeIngredient> mainFoods;

    @ApiModelProperty(value="食谱配料[]")
    private List<RecipeIngredient> foods;

    @ApiModelProperty(value="相关食材ID[]")
    private List<String> foodIds;

    @ApiModelProperty(value="浏览数量")
    private Integer lookUpNo;

    @ApiModelProperty(value="收藏数量")
    private Integer collectionNo;

    @ApiModelProperty(value="点赞数量")
    private Integer thumbsUpNo;

    @ApiModelProperty(value="热量")
    private Integer quantityHeat;

    @ApiModelProperty(value="菜谱详情")
    private String detailsText;

    @ApiModelProperty(value="注意事项")
    private String note;

    @ApiModelProperty(value="上传时间")
    private Date uploadTime;

    @ApiModelProperty(value="修改时间")
    private Date updateTime;

    @ApiModelProperty(value="用户是否点赞")
    private Boolean isThumbsUp;

    @ApiModelProperty(value="用户是否收藏")
    private Boolean isCollection;

    @ApiModelProperty(value="用户是否收藏")
    private Boolean isRecommend;

    @ApiModelProperty(value="Web地址")
    private String webUrl;

    @ApiModelProperty(value="分享地址")
    private String shareUrl;

    @ApiModelProperty(value="小程序路径")
    private String miniPage;

    public String getWebUrl() {
        return ShareInfoEnum.SHARE_RECIPE.getWebUrl() + this.uuId;
    }

    public String getShareUrl() {
        return ShareInfoEnum.SHARE_RECIPE.getShareUrl() + this.uuId;
    }

    public String getMiniPage() {
        return ShareInfoEnum.SHARE_RECIPE.getMiniPage() + this.uuId;
    }

    @Override
    public String getUuId() {
        return uuId;
    }

}
